package functions

import (
	"strconv"

	"github.com/astaxie/beego"
)

/**
 * 函数层初始化
 * 主要是注入模版函数等
 */

var col_offset_width string = "2"
var col_offset_width_int, _ = strconv.Atoi(col_offset_width)
var col_lg_width string = strconv.Itoa(12 - col_offset_width_int)

type Bootstrap struct {
}

func (b *Bootstrap) Init() {
	beego.AddFuncMap("html_input", input_text)
	beego.AddFuncMap("html_label_input", input_label_text)
	beego.AddFuncMap("html_password", input_password)
	beego.AddFuncMap("html_label_password", input_label_password)

	beego.AddFuncMap("form_build", form_bg)
	beego.AddFuncMap("form_hori_build", form_horizontal_bg)
	beego.AddFuncMap("form_end", form_ed)

	beego.AddFuncMap("btn_block_success", button_block_success)
	beego.AddFuncMap("btn_block_danger", button_block_danger)
	beego.AddFuncMap("btn_inline_default", button_inline_default)
}
